<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableCates extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('cates', function (Blueprint $table) {
			// $table->engine = 'InnoDB';
			$table->increments('id');
			$table->string('cate_name', 25)->comment('分类名称');
			$table->integer('user_id')->comment('创建者id');
			$table->boolean('status')->default(true)->comment('状态')->index();
			$table->index('user_id');
			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::dropIfExists('cates');
	}
}
